#ifndef MUSICPLAYER_HTTPUTILS_H
#define MUSICPLAYER_HTTPUTILS_H

#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>

class HttpUtils : public QObject {
Q_OBJECT

public:
    explicit HttpUtils(QObject *parent = nullptr);
    ~HttpUtils() override;

signals:
    void onReplySignal(QString reply);

private:
    QNetworkAccessManager *manager;
    QString BASE_URL = "http://43.143.145.172:3000/";
//    QString BASE_URL = "https://api-music.shenjianl.cn";

public:
    Q_INVOKABLE void replyFinished(QNetworkReply *reply);
    Q_INVOKABLE void connect(QString url);
};

#endif //MUSICPLAYER_HTTPUTILS_H
